/*
 * Package: org.grassfield.common.service
 * FileName: UserRoleService.java
 *  
 * Created by pandian on Jan 28, 2011
 */
package service;

import java.util.List;

import dao.IUserRoleDAO;
import bean.UserRole;


/**
 * The Class UserRoleService.
 */
public class UserRoleService implements IUserRoleService {
	private IUserRoleDAO userRoleDAO;
	
	/**
	 * Sets the user role dao.
	 * 
	 * @param userRoleDAO the new user role dao
	 */
	public void setUserRoleDAO(IUserRoleDAO userRoleDAO) {
		this.userRoleDAO = userRoleDAO;
	}

	/* (non-Javadoc)
	 * @see org.grassfield.common.service.IUserRoleService#add(org.grassfield.common.entity.UserRole)
	 */
	@Override
	public UserRole add(UserRole userRole) {
		return this.userRoleDAO.add(userRole);
	}

	/* (non-Javadoc)
	 * @see org.grassfield.common.service.IUserRoleService#find(java.lang.Long)
	 */
	@Override
	public UserRole find(Long id) {
		return this.userRoleDAO.find(id);
	}

	/* (non-Javadoc)
	 * @see org.grassfield.common.service.IUserRoleService#list()
	 */
	@Override
	public List<UserRole> list() {
		return this.userRoleDAO.list();
	}

	@Override
	public void update(UserRole userRole) {
		this.userRoleDAO.update(userRole);
	}
}
